//
//  NSObject+Common.h
//  ContinueEducation
//
//  Created by cjg.mini on 2018/7/10.
//  Copyright © 2018年 CE. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (Common)

NS_ASSUME_NONNULL_BEGIN

NSString * _Nonnull NSDocumentsFolder(void);
NSString *NSCacheFolder(void);


- (BOOL)showError:(NSError *)error;
- (void)showHudTipStr:(NSString *)tipStr;
- (NSString *)dateFormatWithTimeInterval:(NSTimeInterval)time;
- (NSString *)dateFormatyyyy_MM_dd:(NSTimeInterval)time;

- (UIViewController *)getKeyWindowRootViewController;

- (void)alertWithMsg:(NSString *)msg sureBtnTitle:(NSString *)sureTitle cancelBtnTitle:(NSString *)cancelTitle sureHander:(void (^ __nullable)(UIAlertAction *action))sureHander cancelHander:(void (^ __nullable)(UIAlertAction *action))cancelHander;

+ (BOOL)compareWithVersionNewVersion:(NSString *)newVersion;

+ (void)updataVersionWithIsBackground:(BOOL)isBackground;

+ (BOOL)SystemSelector:(SEL)systemSelector swizzledSelector:(SEL)swizzledSelector error:(NSError *)error;

+ (NSString *)getNetworkReachabilityStatus;


/// 获取题库用户ID
+ (NSString *)getTikuUserId;
NS_ASSUME_NONNULL_END
@end
